var http = require('http');
var fs = require('fs')
var server = http.createServer();

server.on('request', function (res, resp) {
    resp.setHeader('Content-type', 'text/html;charset=utf-8')

    // fs.readFile('./demo/7-draw-pie.html', 'utf8', (err, data) => {
    //     resp.end(data);
    // })

    fs.readFile('./demo/8-d3-graphs.html', 'utf8', (err, data) => {
        resp.end(data);
    })

});

server.listen(8080, function () {
    console.log("localhost:8080")
});